﻿<%@ Page Language="C#" MasterPageFile="~/MasterTheme/Auto.master" AutoEventWireup="true"
    Inherits="xIx.Web.Portal.PageBase" Title="Untitled Page" %>

<%@ Register Src="~/UserControls/LoginPan.ascx" TagName="LoginPan" TagPrefix="uc3" %>
<%@ Register Assembly="xIx.Web.Portal" Namespace="xIx.Web.Portal" TagPrefix="DS" %>
<script runat="server" language="c#">
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) {
            DropDownList1.Items.Clear();
            DropDownList1.Items.Add("全部");
            for (int i = 1980; i < DateTime.Now.Year; i++)DropDownList1.Items.Add(i.ToString());

            DropDownList2.Items.Clear();
            foreach (string p in "北京:beijing,安徽:anhui,福建:fujian,甘肃:gansu,广东:guangdong,广西:guangxi,河北:hebei,河南:henan,黑龙江:heilongjiang,湖北:huibei,湖南:hunan,江苏:jiangsu,辽宁:liaoning,内蒙古:neimonggu,宁夏:ningxia,山东:shandong,山西:shanxi,陕西:shaanxi,四川:sichuan,新疆:xijiang,云南:yunnan".Split(',')) 
            {
                var liv=p.Split(':');
                DropDownList2.Items.Add(new ListItem(liv[0],liv[1]));
            }
            DropDownList1.SelectedIndex = DropDownList2.SelectedIndex = 0;
        }

    }
    public void DoQuery(object s,object a) {
        if (DropDownList1.SelectedIndex == -1 || DropDownList2.SelectedIndex == -1) {
            base.Alert("必须选择年份和地区。");
            return;
        }
        Response.Redirect(string.Format( "XingBianChaXun.aspx?Y={0}&P={1}",DropDownList1.Text,HttpUtility.UrlEncode(DropDownList2.Text)));
    }
</script>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="sd-contentarea">
        <tr>
            <td height="36" colspan="3">
                <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td width="46">
                            &nbsp;
                        </td>
                        <td width="751" class="title_line">
                            <h2>
                                <img src="Images/title_icon.gif" width="7" height="7" align="absmiddle" />∷>监测数据>行变量数据</h2>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="3">
                &nbsp;
            </td>
            <td width="39" valign="top">
                &nbsp;
            </td>
            <td width="751" class="InfoList_BG" valign="top">
                <table width="100%" height="168" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td class="text_con" valign="top" colspan="2">
                            <p>
                                <%--<img src="XingBianLiangShuoMing.png" />--%>
                                <DS:PageText runat="server" ID="pt1" EnableViewState="false" TID="XingBianLiang"></DS:PageText>
                                <table><tr><td>年份：<asp:DropDownList ID="DropDownList1" runat="server"><asp:ListItem Text="2008"></asp:ListItem>
                                    </asp:DropDownList>
                                </td><td>地区：<asp:DropDownList ID="DropDownList2" runat="server">
                                    </asp:DropDownList>
                                </td><td>
                                    <asp:Button ID="Button1" OnClick="DoQuery" runat="server" Text="查询" /> </td></tr></table>
                            </p>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
</asp:Content>
